#ifndef __hr_sc04_H__
#define __hr_sc04_H__
#include "gd32f4xx.h"

#define HR_SC04_TRIG_RCU_GPIO_PORT RCU_GPIOB //PB6
#define HR_SC04_ECHO_RCU_GPIO_PORT RCU_GPIOB //PB7

#define HR_SC04_TRIG_PORT GPIOB
#define HR_SC04_TRIG_PIN GPIO_PIN_7

#define HR_SC04_ECHO_PORT GPIOB
#define HR_SC04_ECHO_PIN GPIO_PIN_6


void hr_sc04_driver_config(void);

float hr_sc04_driver_get_distance(void);
float hr_sc04_driver_get_distance_mine(void);

void hr_sc04_driver_test(void);

#endif
